Skip to main content

Menu Price file Import

Introduction

This will import menu price file to Cloud SQL for PostgreSQL

Fields

Column PositionDescriptionDatatypeValidationMax lengthMandatoryExample
AIGNORE
BIGNORE
CVehicle IdNumberNumbers (0-9)5Y1
DRepair short descStringA-Z characters20YBrakes
ERepair desc 1StringA-Z and 0-9 & All Special Characters100YRenew Front Brake Pads
FRepair desc 2StringA-Z and 0-9 & All Special Characters100YStandard
GLabour TimeNumberupto 2 decimals4Y0.8
HPart numberStringA-Z and 0-9 & All Special Characters 50Y1678168380
IPart NameStringA-Z and 0-9 & All Special Characters 100YBrake Pads
JPart priceNumberupto 2 decimals7Y78.3
KPart/fluid qtyNumberupto 2 decimals5Y1
LIGNORE
MAdditional notes for partsStringA-Z and 0-9 & All Special Characters300NSome notes

Importing Menu Price Files

This process imports menu price files from Modulus into the database. Modulus provides separate menu price files for Peugeot and Citroen brands.

Step 1: Preparation

Before importing new menu price data, you need to clear existing data and prepare the files:

1.1 Clear Existing Data

  • Truncate the existing data in the modulus_menu_price table

1.2 Prepare Import Files

  • You will receive two separate files from Modulus:
    • One for Peugeot menu prices
    • One for Citroen menu prices
  • Important: Import both files one after the other (not simultaneously)

1.3 Upload Files to Storage

  • Upload each file to the Google Cloud Storage bucket: fnp-imports/modulus
  • Required filename: menu_price.csv (rename each file to this exact name before uploading)
  • Process one brand at a time

Step 2: File Validation (Optional)

  1. Navigate to Cloud Scheduler
  2. Locate and run the Modulus_menu_price_validation job
    • Note: Job name may vary slightly in different environments

Step 3: Import Process

  1. In the same Cloud Scheduler console
  2. Locate and run the Modulus_menu_price_import job
    • Note: Job name may vary slightly in different environments
  3. Monitor the import job for completion

Step 4: Repeat for Second Brand

After successfully importing the first brand's file:

  1. Upload the second brand's file (rename to menu_price.csv)
  2. Repeat Step 3 for the second file
  3. Ensure both Peugeot and Citroen menu price data are imported

Troubleshooting Memory Issues

⚠️ Memory Error Handling:

If you encounter a memory error like Memory limit of 512 MiB exceeded with 515 MiB used, follow these steps:

  1. Increase the memory allocation for the import service (above 512MB)
  2. Re-run the import job
  3. Revert the memory back to default (512MB) after successful import

Testing

  1. Data will be inserted to Cloud SQL for PostgreSQL under fpn database in table modulus_menu_price.
Status: Accepted
Category: Protected
Authored By: Gladson on Jan 5, 2024
Revisions